/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Bean;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.application.FacesMessage;  
import javax.faces.context.FacesContext;  
  
import org.primefaces.event.FileUploadEvent;  
import org.primefaces.model.UploadedFile; 

/**
 *
 * @author Toshiba
 */
@ManagedBean
@RequestScoped

 
 
public class FileUploadController {  

 public void handleFileUpload(FileUploadEvent event) {  
FacesMessage msg = new FacesMessage("Sucesso", event.getFile().getFileName() + " foi carregada corretamente");  
     FacesContext.getCurrentInstance().addMessage(null, msg);  
 }  
}  

